Stabilize backend foundation and clarify boundaries#686
Open
therobbiedavis wants to merge 88 commits into
Open
Stabilize backend foundation and clarify boundaries#686therobbiedavis wants to merge 88 commits into
therobbiedavis wants to merge 88 commits into
Conversation
Enable deterministic NuGet restores for backend projects by turning on package lock files and CI locked restore mode. Add generated NuGet lock files so local and CI test runs resolve the same dependency graph before `dotnet test --no-restore`. Pull in the dependency updates from `chore/dependency-update`, including the Node engine update to `^24.15.0` and refreshed root/frontend npm lockfiles. Clean up frontend build warnings introduced during dependency validation by removing the auth store's dynamic router import and moving router instance access into a small shared service. Add a narrow Vite/Rolldown warning filter for known upstream `@vueuse/core` pure annotation noise. Validated with: - `dotnet restore listenarr.slnx /p:CI=true` - `dotnet test listenarr.slnx --no-restore` - `npm install` - `cd fe && npm install` - `cd fe && npm run test:unit` - `cd fe && npm run build` - `cd fe && npm run lint:check` - `git diff --check`
This was referenced Jun 12, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2700aa2f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # listenarr.application/Search/SearchService.cs # tests/Features/Api/Services/SearchServiceSortingTests.cs
| using var scope = _scopeFactory.CreateScope(); | ||
| var audible = scope.ServiceProvider.GetRequiredService<AudibleService>(); | ||
|
|
||
| if (audiobook.Authors == null || !audiobook.Authors.Any()) |
| _logger.LogInformation("TryPrepareMyAnonamouseTorrentAsync called for '{Title}', IndexerId: {IndexerId}, TorrentUrl: '{TorrentUrl}'", | ||
| searchResult.Title, searchResult.IndexerId, searchResult.TorrentUrl); | ||
|
|
||
| if (searchResult.IndexerId == null) |
- Move MyAnonamouse publish date and age parsing into a focused helper - Keep response parser result mapping behavior unchanged
- Move queue removal lookup, client removal, and cleanup rules into a focused workflow - Keep DownloadService as a thin delegate for removal requests
- Move GitHub release asset lookup out of FfmpegService - Keep ffprobe install and extraction behavior unchanged
- Move NZBGet history lookup and queue deletion into a focused workflow - Keep adapter removal behavior and logging unchanged
- Move SABnzbd queue and history deletion into a focused workflow - Keep adapter removal behavior and logging unchanged
- Move qBittorrent auth probing and torrent deletion into a focused workflow - Keep adapter removal semantics and logging unchanged
- Move Transmission torrent-remove RPC payload handling into a focused workflow - Keep adapter removal semantics and logging unchanged
- Move queue repository candidate loading into a focused helper - Preserve DDL visibility rules and known client ID matching inputs - Update queue reconciliation test construction for the new helper
- Move client queue polling and stale snapshot fallback into a focused poller - Keep queue enrichment and orphan retention in DownloadQueueService - Preserve focused queue reconciliation test coverage
- Move author catalog keying, matching, language normalization, and cache DTO mapping into a focused helper - Keep author catalog lookup and persistence orchestration in the service - Preserve focused author and metadata test coverage
- Move compatibility indexer response shaping into a focused builder - Preserve read versus save API-key response behavior - Remove the stale private field DTO from the controller
- Move final ASIN disposition auditing out of SearchService - Preserve candidate drop reason mutation and diagnostic logging - Register the helper in API and infrastructure service setup
- Move torrent bencode rewrite and announce parsing logic into a focused helper - Keep MyAnonamouseHelper public methods as compatibility delegates - Preserve MAM and torrent-focused test coverage
- Move platform-specific ffprobe download URL and checksum defaults into a focused helper - Keep installation orchestration and provider override behavior unchanged - Preserve ffmpeg-focused test coverage
- Move title search ASIN lookup and Discord response shaping into a focused workflow - Keep route status codes and response payloads unchanged - Register the workflow through API startup
- Move validated notification HTTP sending and redirect checks into a focused helper - Preserve request-context private target rules and existing HttpClient behavior - Keep provider-specific notification dispatch unchanged
- Replace inline search result image cache handling with SearchResponseMapper - Remove the now-unused controller image path wrapper - Preserve search-controller focused test coverage
- Move MyAnonamouse torrent download URL construction into a focused helper - Preserve mam_id decode and encode behavior - Keep parser mapping behavior unchanged
- Move SABnzbd queue/history merge behavior into a focused workflow - Move SABnzbd import item resolution into a dedicated resolver - Keep adapter interface and request/response semantics unchanged
- Move NZBGet add orchestration into a focused workflow - Move NZBGet import item history resolution into a dedicated resolver - Keep adapter interface and XML-RPC behavior unchanged
- Move MyAnonamouse debug-search orchestration into a focused workflow - Keep route, response payloads, and local parsed-search behavior unchanged
- Move existing-quality cutoff evaluation into a focused helper - Move automatic download-client selection into a dedicated selector - Keep search scheduling, scoring, and download queuing behavior unchanged
- Move qBittorrent import path resolution into a focused resolver - Keep queue-item and download-client-item import behavior unchanged
- Move Transmission import path resolution into a focused resolver - Keep RPC lookup, content path, and source-file behavior unchanged
- Move ffprobe archive expansion and traversal checks into a focused helper - Keep install discovery, checksum validation, and binary promotion behavior unchanged
- Add shared worker cycle and processor interfaces - Wire hosted workers through processor contracts - Add ownership and import handoff guard tests
- Move scan and move orchestration into processor services - Keep hosted services as queue adapters - Add processor tests and worker metrics
- Extract hosted worker logic into explicit processors - Document ownership, retry, idempotency, and handoffs - Add processor boundary and worker metric tests - Rename moved-download cleanup hosted adapter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR combines #679 and #685 into one backend foundation PR so the dependency/test-loop work and architecture-boundary cleanup can be reviewed and merged together.
The first part gets dependency restores deterministic again. Backend package lock files are committed, CI restore uses locked mode, publish runtime identifiers are covered, and the frontend dependency/build-warning cleanup from the dependency update work is included.
The second part makes the backend layer boundaries more intentional. Application now owns contracts for behavior, while infrastructure owns framework and adapter details like EF/SQLite, HTML parsing, image probing, audio tagging, Data Protection, request context access, and realtime transport wiring.
Refs #677. Supersedes #679 and #685.
Changes
Added
Changed
--no-restore.chore/dependency-update, including Node engine metadata and npm lockfile updates.listenarr.applicationand behind application interfaces.Program.cs.Fixed
Testing
dotnet build listenarr.slnx --no-restore— 0 warnings, 0 errorsdotnet test listenarr.slnx --no-build— 696 passedcd fe && npm run test:unit -- --run— 378 passed, 1 skipped test filecd fe && npm run buildcd fe && npm run lint:checkgit diff --check origin/canary...HEADNotes
This intentionally replaces the separate dependency and architecture PRs so the repo gets one coherent foundation update: first make validation deterministic, then make the backend boundaries cleaner on top of that same validated graph.